<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: luanzg <782114271@qq.com>
// +----------------------------------------------------------------------
use think\facade\Route;
use app\common\middleware\Admin;

Route::group(function () {
    // 角色请求路由规则    
    Route::get('roles/list', 'rolesLists');
    Route::get('roles/rulesAlllist', 'rulesAlllist');   
    Route::get('roles/:id', 'rolesInfo');
    Route::get('roles', 'RolesList');
    Route::delete('roles/:roleid/rule/:ruleid', 'roleRuleDel');
    Route::delete('roles/:id', 'rolesDelete');
    Route::post('delroles', 'rolesDeletes');    
    Route::post('roles/:roleid/rules', 'rolesRuleAdd');
    Route::post('roles', 'rolesAdd');       
})->prefix('Roles/')->allowCrossDomain(headers())->middleware(Admin::class);
